﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using PPI.General;
using PPI.WebConsumer.PPI.Svc;

namespace PPI.WebConsumer.Inspection
{
    public class WInspectionNote
    {
        public static DataSet SelectAllIdName()
        {
            ConfigReader _Reader = ConfigReader.GetInstance();
            PPI.Svc.Service1 svc = new Service1();
            return svc.InspectionNotes_SelectAllIdName(_Reader.ConectionMode);
        }

        public static DataSet GetNoteByInspectionResult(Int32 inspectionResultId)
        {
            ConfigReader _Reader = ConfigReader.GetInstance();
            PPI.Svc.Service1 svc = new Service1();
            return svc.InspectionNotes_GetNotesByInspectionResult(inspectionResultId, _Reader.ConectionMode);
        }

        public static void DeleteByInspectionResult(Int32 inspectionResultId)
        {
            ConfigReader _Reader = ConfigReader.GetInstance();
            PPI.Svc.Service1 svc = new Service1();
            svc.InspectionNotes_DeleteByInspectionResult(inspectionResultId, _Reader.ConectionMode);
        }

        public static Int32 Insert(Int32 noteId,Int32 inspectionResultId)
        {
            ConfigReader _Reader = ConfigReader.GetInstance();
            PPI.Svc.Service1 svc = new Service1();
            return svc.InspectionNotes_Save(noteId, inspectionResultId, _Reader.ConectionMode);
        }
    }
}
